<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
    <style>
        
    </style>
</head>
<body>
<div class="div1">
</div>
</body>

<script type="text/javascript">
    
    $('.div1').append(createCard());
    $('.div1').append(createCard());
    console.log($('.div1')[0]);

    function createCard(){
        var card = $('<div>');
        card.html("Hello <b>world</b>!");
        return card;
    }
</script>

</html>